class Solution:
    def smallestNumber(self, n: int) -> int:
        return (1 << (len(bin(n)) - 2)) - 1


print(bin(5))
print(bin(((1 << 11) - 1) ^ 5))
print(bin(((1 << 11) - 1) ^ 5 & 5 | 5))

print(((1 << 11) - 1) ^ 5 & 5)
